import os
os.system('cls')
import mapy
home = os.environ['HOME']
modelpath = \
    os.path.join( home, 'programming', 'python', 'modeling-analysis-python',
                   'tests', 'rods_spiral_many_coords.dat' )
fem1 = mapy.FEM()
fem1.create_model()
fem1.read_new_file( modelpath )
fem1.model.rebuild()
tmp = []
for coord in fem1.model.coorddict.values():
    print coord
    tmp.append( [ coord.id, coord.rcobj.id ] )
#for tmpi in tmp:
#    print tmpi
tmp = []
for grid in fem1.model.griddict.values():
    tmp.append( [ grid.id, grid.array ] )
tmp.sort()
for tmpi in tmp:
    print tmpi, fem1.model.griddict[ tmpi[0] ].garray
